package org.lq.shopping.service.impl;

import java.util.List;

import org.lq.shopping.dao.UserGoodsDao;
import org.lq.shopping.dao.impl.UserGoodsDaoImpl;
import org.lq.shopping.entity.UserGoods;
import org.lq.shopping.service.UserGoodsService;
/**
 * 用户关注商品业务接口实现
 * @author 61417
 *
 */
public class UserGoodsServiceImpl implements UserGoodsService {
	private UserGoodsDao userGoodsDao = new UserGoodsDaoImpl();
	@Override
	public boolean addUserGoods(UserGoods ug) {
		return userGoodsDao.add(ug)>0;
	}

	@Override
	public boolean deleteUserGoods(int uid, int goodsId) {
		return userGoodsDao.deleteUserGoods(uid, goodsId)>0;
	}

	@Override
	public List<UserGoods> findPageByUserType(String goodsType, int userId, int pageIndex, int pageSize) {
		return null;
	}

	@Override
	public List<UserGoods> findPageByUserId(int userId, int pageIndex, int pageSize) {
		return null;
	}
  
	@Override
	public List<Integer> findGoodsById(int userId) {
		return userGoodsDao.findByUserId(userId);
	}

}
